package online.flowerinsnow.minecraft.bukkit.manhunt.core.compass.impl;

import org.bukkit.Location;
import org.bukkit.entity.Player;
import online.flowerinsnow.minecraft.bukkit.manhunt.core.compass.ITrackingLocation;

public class TrackingLocationImpl implements ITrackingLocation {
    public final Player player;
    public final Location location;
    public final boolean lastKnown;
    public TrackingLocationImpl(Player player, Location location, boolean lastKnown) {
        this.player = player;
        this.location = location;
        this.lastKnown = lastKnown;
    }
    @Override
    public Player getPlayer() {
        return player;
    }

    @Override
    public Location getLocation() {
        return location;
    }

    @Override
    public boolean isLastKnown() {
        return lastKnown;
    }
    public static ITrackingLocation build(Player player, Location location, boolean lastKnown) {
        return new TrackingLocationImpl(player, location, lastKnown);
    }
    public static ITrackingLocation build(Player player) {
        return build(player, player.getLocation(), false);
    }
}
